package com.smarthealthring.mm.utils;

import android.widget.Toast;

import com.smarthealthring.mm.App;

/**
 * Created by hewei26 on 2017/5/3.
 */

public class ToastUtil {

    private static Toast toast = null;

    public static void longShow(String msg) {
        if(toast == null){
            toast = Toast.makeText(App.getInstance(), msg, Toast.LENGTH_LONG);
        }else{
            toast.setText(msg);
        }
        toast.show();
    }

    public static void shortShow(String msg) {
        if(toast == null){
            toast = Toast.makeText(App.getInstance(), msg, Toast.LENGTH_SHORT);
        }else{
            toast.setText(msg);
        }
        toast.show();
    }
}
